<template>
    <div style="margin: 50px;border: gray 1px solid;width:250px;height: 800px;">
       <PermissionTree :tree="treeData" :keys="treeKeys"></PermissionTree>
    </div>
</template>
<script>
    import PermissionTree from '@/components/permissionTree/permissionTree.vue'
    
    export default {
        name: 'loading',
        components: {
            PermissionTree
        },
        data: function () {
            return {
                selectItem: 0,
                treeKeys: {
                    id: 'id',
                    name: 'name',
                    children: 'children'
                },
                treeData: [
                    {
                        id: 1,
                        name: 'A1',
                        checked: true,
                        children: [
                            {
                                id: 2,
                                name: 'AA1',
                                checked: false,
                                children: [],
                            },
                            {
                                id: 3,
                                name: 'AA2',
                                checked: false,
                                children: [
                                    {
                                        id: 4,
                                        name: 'AAA1',
                                        checked: false,
                                        children: []
                                    },
                                    {
                                        id: 5,
                                        name: 'AAA2',
                                        checked: false,
                                        children: []
                                    }
                                ]
                            }
                        ]
                    },
                    {
                        id: 6,
                        name: 'B1',
                        checked: false,
                        children: []
                    },
                    {
                        id: 7,
                        name: 'C1',
                        checked: false,
                        children: [
                            {
                                id: 8,
                                name: 'CC1',
                                checked: false,
                                children: []
                            },
                            {
                                id: 9,
                                name: 'CC1',
                                checked: false,
                                children: []
                            }
                        ]
                    }
                ]
            }
        },
        methods: {
        }
    }
</script>
<style scoped>

</style>